﻿namespace PredatorPrey.Library
{
	// Id		: $Id: PathCost.cs 39 2009-04-23 21:38:07Z kristof@kristofmattei.be $
	// Date		: $Date: 2009-04-23 21:38:07 +0000 (Thu, 23 Apr 2009) $
	// Author	: $Author: kristof@kristofmattei.be $
	// Revision	: $Revision: 39 $
	/// <summary>
	/// Static class with the method to calculate the path cost
	/// </summary>
	static class PathCost
	{
		/// <summary>
		/// Gets the path cost out of a resx file
		/// </summary>
		/// <param name="fieldType">The fieldType</param>
		/// <returns>The path cost of that fieldType</returns>
		public static int GetPathCost(FieldType fieldType)
		{
			int pathCost;

			switch (fieldType)
			{
				case FieldType.Empty:
					pathCost = int.Parse(PredatorPrey.Library.Properties.Resources.Empty);
					break;

				case FieldType.Grass:
					pathCost = int.Parse(PredatorPrey.Library.Properties.Resources.Grass);
					break;

				case FieldType.Swamp:
					pathCost = int.Parse(PredatorPrey.Library.Properties.Resources.Swamp);
					break;

				default:
					pathCost = int.Parse(PredatorPrey.Library.Properties.Resources.Empty);
					break;
			}

			return pathCost;
		}
	}
}
